import request from '@/utils/request'

// 统一前缀
var prefix = '/courseService'

//条件查询课程
export function lookCourse(course) {
  return request({
    url: `${prefix}/course/list`,
    method: 'GET',
    params: course,
  })
}

//添加一条课程
export function insertOneCourse(course) {
  return request({
    url: `${prefix}/course`,
    method: 'POST',
    data: course,
  })
}

//修改课程
export function updateOneCourse(course) {
  return request({
    url: `${prefix}/course`,
    method: 'PUT',
    data: course,
  })
}

//删除课程
export function deleteCourse(ids) {
  return request({
    url: `${prefix}/course`,
    method: 'DELETE',
    data: ids,
  })
}
